<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>APlayer Demo</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <style>
        body {
            font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
        }
        .container {
            max-width: 32rem;
            margin-left: auto;
            margin-right: auto;
            margin-bottom: 150px;
        }
        h1 {
            font-size: 54px;
            color: #333;
            margin: 30px 0 10px;
        }
        h2 {
            font-size: 22px;
            color: #555;
        }
        h3 {
            font-size: 24px;
            color: #555;
        }
        hr {
            display: block;
            width: 7rem;
            height: 1px;
            margin: 2.5rem 0;
            background-color: #eee;
            border: 0;
        }
        a {
            color: #08c;
            text-decoration: none;
        }
        p {
            font-size: 18px;
        }
    </style>
    <script src="https://cdn.jsdelivr.net/npm/vconsole/dist/vconsole.min.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/hls.js/dist/hls.min.js"></script>
    <script src="APlayer.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/color-thief-don@2.0.2/src/color-thief.js"></script>
</head>
<body>
    <div class="container">
        <h1>APlayer</h1>
        <h2>Wow, such a beautiful html5 music player</h2>
        <p>Made by <a href="https://www.anotherhome.net/" target="_blank">DIYgod</a>. Available on <a href="https://github.com/DIYgod/APlayer" target="_blank">GitHub</a>. Licensed MIT.</p>
        <hr>
        <h3>Normal</h3>
        <div id="player1"></div>
        <p></p>
        <button onclick="ap1.play()">ap.play()</button>
        <button onclick="ap1.seek(100)">ap.seek(100)</button>
        <button onclick="ap1.pause()">ap.pause()</button>
        <button onclick="ap1.toggle()">ap.toggle()</button>
        <button onclick="ap1.volume(0.1)">ap.volume(0.1)</button>
        <button onclick="ap1.addAudio([
            {
                name: 'あっちゅ～ま青春!',
                artist: '七森中☆ごらく部',
                url: 'https://cn-south-17-aplayer-46154810.oss.dogecdn.com/yuruyuri.mp3',
                cover: 'https://cn-south-17-aplayer-46154810.oss.dogecdn.com/yuruyuri.jpg'
            },
            {
                name: 'secret base~君がくれたもの~',
                artist: '茅野愛衣',
                url: 'https://cn-south-17-aplayer-46154810.oss.dogecdn.com/secretbase.mp3',
                cover: 'https://cn-south-17-aplayer-46154810.oss.dogecdn.com/secretbase.jpg'
            },
            {
                name: '回レ！雪月花',
                artist: '小倉唯',
                url: 'https://cn-south-17-aplayer-46154810.oss.dogecdn.com/snowmoonflowers.mp3',
                cover: 'https://cn-south-17-aplayer-46154810.oss.dogecdn.com/snowmoonflowers.jpg'
            }
        ])">ap.addAudio(...)</button>
        <button onclick="ap1.destroy()">ap.destroy()</button>
        <h3>With playlist</h3>
        <div id="player4" class="aplayer"></div>
        <p></p>
        <button onclick="ap4.switchAudio(2)">ap.switchAudio(2)</button>
        <h3>With lyrics</h3>
        <div id="player3" class="aplayer"></div>
        <h3>With playlist and lyrics</h3>
        <div id="player5" class="aplayer"></div>
        <h3>Narrow</h3>
        <div id="player2" class="aplayer"></div>
        <h3>HLS</h3>
        <div id="player6" class="aplayer"></div>
        <div id="player7" class="aplayer"></div>
        <div id="player8" class="aplayer"></div>
    </div>
    <script>
        if (/mobile/i.test(window.navigator.userAgent)) {
            new VConsole();
        }
    </script>
    <script src="https://cdn.jsdelivr.net/npm/jquery"></script>
    <script src="demo.js"></script>
</body>
</html>